//Allen Ott-Character Movement, put everything together, also modified add and remove
//Chris Autwell-Story, Win Check, Helped on add and remove items
//Salwa- Random placement of items and the other stuff with items.
#include <iostream>
#include <fstream>
#include <string>
#include <cctype>
#include<cstdlib>
#include "Dungeon.h"
#include "Item.h"
#include "location.h"
#include "character.h"
#include "Shop.h"
#include <ctime>
using namespace std;

void attributes(Character&, int&);
int main()
{
    srand(time(NULL));
	int rows=0;     // room height
        int cols=0;    // room width
	char response; // for yes or no questions
	int direc;       //for the direction the user choose to go
	string answer;
	int points = 24;
	string charname;
	bool win = false; //to check for win
	Dungeon dungeon(rows, cols);
	Character player;
	Shop shop("weapons.txt", "armor.txt");
        Item* item = NULL; //for pickup of items

	//setup character
	dungeon.getRoom(player.getX(), player.getY()).setPlayer(& player); 

	//setup items
	Item scepter;
	scepter.setName("Golden Scepter");
	scepter.setValue(10);
	Item scarab;
	scarab.setName("Emerald Scarab");
	scarab.setValue(5);
	Item ankh;
	ankh.setName("Ankh");
	ankh.setValue(2);

	//Place Items

	try
	{
		player.setStr(8);
		player.setCon(8);
		player.setDex(8);
		player.setWis(8);
		player.setCha(8);
		
		cout << "Hello, welcome to Relic Hunter!  The first thing we need to do is"<<endl;
		cout << "set up your character." << endl;

		player.display();

		cout<<endl;

		do
		{
			cout<<"Would you like to change your stats? (Y or N): ";
			cin >> answer;
		
			if (toupper(answer[0]) == 'Y')
			{	
				system ("cls");
				attributes (player, points);
			}
			

		}while(toupper(answer[0]) == 'Y');

		cout<<"Please enter the name that you have chosen for your character: ";

		cin.clear();

		getline(cin, charname);
		cout << endl;
		
		player.setName(charname);
		system("cls");
		cout<<"Great " <<player.getName()<<", you have now finished creating your character."<<endl;

		player.setGold(100 + (10 * player.getChaMod()) + (10 * player.getWisMod()));
		

		player.display();

		cout<<endl;

		
		system("pause");
		system("cls");
		cout<< player.getName() <<"begins on his quest but suddenly realizes he needs armor and a weapon."<<endl;
		cout <<"So before he starts his search for the Lost Pyramid, he drops by the shop."<<endl<<endl;
		system("pause");
		system("cls");
		shop.enter(player);

		int itemX, itemY;
		for(int i = 0; i < 3; i++)
			{
				itemX = rand()%dungeon.getHeight();
				itemY = rand()%dungeon.getWidth();
				if(itemX == dungeon.getHeight()-1 && itemY == dungeon.getWidth()-1)
				{
					itemX = rand()%dungeon.getHeight();
					itemY = rand()%dungeon.getWidth();
				}
				if(dungeon.getRoom(itemX,itemY).getWall())
				{
					while(dungeon.getRoom(itemX,itemY).getWall())
					{
						itemX = rand()%dungeon.getHeight();
						itemY = rand()%dungeon.getWidth();
						if(itemX == dungeon.getHeight()-1 && itemY == dungeon.getWidth()-1)
						{
							//itemX = rand()%dungeon.getHeight();
							//itemY = rand()%dungeon.getWidth();
						}
					}
				}
				if(i==0)
				{	
					dungeon.getRoom(itemX,itemY).setItem(&scepter);
				
				}
    			else if(i==1)
    			{
    				dungeon.getRoom(itemX,itemY).setItem(&scarab);
    				
				}
        		else
        		{
        			dungeon.getRoom(itemX,itemY).setItem(&ankh);

				}
		}
		  
    
    
	//Main loop
	 cout << endl;
	 cout << "It is said that the pyramid of Egypts were built by the people of Egypt to bury" << endl;
	 cout << "their Pharoah so he or she will ascend into the heavens above with the powerful" << endl; 
	 cout << "Egyptian gods.  However, one Pharaoh was unwilling to cooperate with the gods'"<<endl; 
	 cout << "way because he wanted ultimate power.  To try and overthrow the gods, he cast "<<endl; 
	 cout << "an ancient curse on his sacred tomb.  The story goes that the one brave enough"<<endl;
	 cout << "to claim the Pharoah's most cherished possesions would gain access to the power"<<endl; 
	 cout << "of the Egyptian gods.  In turn, you will have ultimate power to do whatever you"<<endl;
	 cout << "please. However, there are several difficult tasks ahead.  You must brave"<<endl; 
	 cout << "through the Pharaoh's loyal servants, discover the Door of Destiny, and "<<endl;
	 cout << "collect the Ankh("<<char(12)<<") of Anubis, the Golden Scepter("<< char(18)<<") of Horus, and the Emerald "<<endl; 
	 cout << "Scarab("<<char(15)<<") of Amun."<<endl<<endl;
	 cout << "For the one that accomplishes these tasks will face the Door of Destiny in" <<endl; 
	 cout << "which the three items must be placed in order of the highest god to the lowest:"<<endl<<endl; 
	 cout << "Pick up the Ankh ("<<char(12)<<") first."<<endl;
	 cout << "Pick up the Golden Scepter("<<char(18)<<") second."<<endl;
	 cout << "Pick up the Emerald Scarab("<< char(15)<<") third."<<endl<<endl;
	 cout << "Do you have what it takes to best the Egyptian gods?"<<endl;
	 cout << "If so, then enter Relic Hunter..."<<endl<<endl;
	system("pause");
	system("cls");
	while(win == false)
	{   
		dungeon.display();
		cout << endl;
		cout << "BACKPACK" << endl;
		cout << "--------" << endl;
		for(int i = player.getNumItemsInKnapsack() - 1; i >= 0; i--) 
		{
			cout <<i+1<<") "<< player.getKnap(i)->getName();
			if (player.getKnap(i)->getName() == "Golden Scepter")
				cout <<" of Horus - " << char(18)<<endl;
			else if (player.getKnap(i)->getName() == "Ankh")
				cout <<" of Anubis - "<< char(12)<<endl;
			else
				cout <<" of Amun - "<<char(15)<<endl;
		
		}
		

		cout<<endl;
		cout<<"1. Move North " << char(24)<<endl;
		cout<<"2. Move South " << char(25)<<endl;
		cout<<"3. Move East " << char(26)<<endl;
		cout<<"4. Move West " << char(27)<<endl;
		cout<<"5. Drop an item in a room if you need to reoraganize your backpack"<<endl;
		cout<<"Please select which way you wish to move : ";
		cin>>direc;
    
		if(direc == 1)//this for when the player chooses to move north
		{        
				 if (player.getX() <= 0 )
				 { 
					   cout<<endl;
					cout<<"You can not pass becuase there is a wall there!"<<endl;
					cout<<"Please choose another way."<<endl;
					   cout<<endl;
					   system("pause");
				 }
				 else if((dungeon.getRoom(player.getX() - 1, player.getY()).getWall()) == true)
				 {
					 cout<<endl;
					 cout<<"Sorry you can't move through walls!!"<<endl;
					 cout<<"Please choose another way."<<endl;
					 cout<<endl;
					 system("pause");
				 }                   
				 else
				 {
					 dungeon.getRoom(player.getX(), player.getY()).setPlayer(NULL);
					 player.setX(player.getX() - 1);
					 dungeon.getRoom(player.getX(), player.getY()).setPlayer(& player);
                 
				 }
                 
     
               
             
		}            
		else if(direc == 2)//this is if the player chooses to move south.
		{
			 if(player.getX() >= dungeon.getHeight()-1)
			 {
				cout<<endl;
				cout<<"You can not pass becuase there is a wall there!"<<endl;
				cout<<"Please choose another way."<<endl;
				cout<<endl;
				system("pause");
            
			 }
			 else if((dungeon.getRoom(player.getX() + 1 , player.getY()).getWall()) == true && player.getX() - 1 != dungeon.getHeight()  && player.getY() != dungeon.getWidth())
			 {
				cout<<endl;
				cout<<"You can not pass becuase there is a wall there!"<<endl;
				cout<<"Please choose another way."<<endl;
				cout<<endl;
				system("pause");
            
			 }                 
			 else
			 {
				 dungeon.getRoom(player.getX(), player.getY()).setPlayer(NULL);
				 player.setX(player.getX() + 1);
				 dungeon.getRoom(player.getX(), player.getY()).setPlayer(& player);
             
			 }

                  
		}            
		else if(direc == 3)//this is for when the user choose to move right
		{
			if(player.getY() >= dungeon.getWidth()-1)
			{
				cout<<endl;
				cout<<"You can not pass becuase there is a wall there!"<<endl;
				cout<<"Please choose another way."<<endl;
				cout<<endl;
				system("pause");
            
			}
             
			else if((dungeon.getRoom(player.getX(), player.getY() + 1).getWall()) == true && player.getX() - 1 != dungeon.getHeight()  && player.getY() != dungeon.getWidth())
			{
				 cout<<endl;
				 cout<<"You can not pass becuase there is a wall there!"<<endl;
				 cout<<"Please choose another way."<<endl;
				 cout<<endl;
				 system("pause");
             
			}                 
			else
			{
				 dungeon.getRoom(player.getX(), player.getY()).setPlayer(NULL);
				 player.setY(player.getY() + 1);
				 dungeon.getRoom(player.getX(), player.getY()).setPlayer(& player);
			}
             
		}            
		else if(direc == 4)
		{
			 if(player.getY() <= 0)
			 {
				cout<<endl;
				cout<<"You can not pass becuase there is a wall there!"<<endl;
				cout<<"Please choose another way."<<endl;
				cout<<endl;
				system("pause");
            
			 }
				 else if((dungeon.getRoom(player.getX(), player.getY() - 1).getWall()) == true)
				  {
					 cout<<endl;
					 cout<<"You can not pass becuase there is a wall there!"<<endl;
					 cout<<"Please choose another way."<<endl;
					 cout<<endl;
					 system("pause");
                 
				  }                 
					 else
					{
						 dungeon.getRoom(player.getX(), player.getY()).setPlayer(NULL);
						 player.setY(player.getY() - 1);
						 dungeon.getRoom(player.getX(), player.getY()).setPlayer(& player);
					 }
     
     
        
		}   
		else if(direc > 5 || direc < 0)
		{
			cout<<endl;
			cout<<"Not a valid choice. "<<"Please choose again."<<endl;
			cout<<endl;
			system("pause");
        
		}

    
    
		/*item stuff goes here///////////////////////////////////////////////////////*/ 
		system("cls");
		dungeon.display();

    
		  cout<<endl;      
		  if(direc != 5)
		  {
			  if(dungeon.getRoom(player.getX(), player.getY()).getItem())
			   {
				  item = dungeon.getRoom(player.getX(), player.getY()).getItem();
           
					 if (item != NULL )
            			{
            				cout << "There is ";
            				if (item -> getName() == "Ankh" || item -> getName() == "Emerald Scarab")
            				{
            					cout << "an ";
            				}
                			else if( item -> getName() == "Golden Scepter")
                			{
                				cout << "a ";
                			}
            			
            				cout<<item -> getName()<<" in this room that is worth "<<item->getValue()<< " gold coins." << endl;
            				cout<< "Would you like to pick it up? ";
            				cin>>response;
							cout<<endl<<endl;
                        
                        
            				while (tolower(response) != 'y' && tolower(response) != 'n')
            				{
            					cout << "Please enter y for yes or n for no: ";
            					cin>>response;
            					cout<<endl<<endl;
            				}
            				if (toupper(response) == 'Y')
            				{
            					player.addToKnapsack(item);
            					cout << "Congratulations, you have obtained the " << item -> getName()<<"."<<endl;
								cout<<"It was added to your backpack. ";
								cout<<endl;
								dungeon.getRoom(player.getX(), player.getY()).setItem(NULL);
								cout<<endl;
								system("pause");
            				}
            				else if(toupper(response) == 'N')
            				{
            					cout << "You just stare at the "<<item -> getName()<<" and decide its best to leave it alone." << endl;
            					cout<<endl;
								system("pause");
            				}
            			} 
            			
            			
				} 
		  }
		if(direc == 5)
		{
			if( dungeon.getRoom(player.getX(), player.getY()).getItem())
			{
				cout<<endl;
				cout<<"You can not drop two items in the same room."<<endl;
				cout<<"Please move to another location to drop the item."<<endl<<endl;
				system("pause");
			}
			else if(player.getX() == dungeon.getHeight()-1 && player.getY() == dungeon.getWidth()-1)
			{
				 cout<<" You can not drop the item in the room of the door of destiny"<<endl;
				 cout<<"Go back one room and put the item their."<<endl<<endl;
				 system("pause");
			}
			else
			{
				 try 
				 {             
						item = player.removeFromKnapsack();
             
						dungeon.getRoom(player.getX(), player.getY()).setItem(item);
                    
						cout<<endl;         
						cout<<"Item was removed succesfully."<<endl<<endl;
						system("pause");                  
                     
				 }
				 catch(KnapsackEmptyException)
				 {
					cout<<"Backpack is empty. "<<"Can not complete request."<<endl;
					system("pause");
				 }
			}
    
		}   
////////////////////////////////////CHECK FOR WIN////////////////////////////////////////////////////
		if(player.getX() == dungeon.getHeight()-1 && player.getY() == dungeon.getWidth()-1)
		{  
			if(player.getNumItemsInKnapsack() == 3) 
			{
				if((player.getKnap(0)->getName() == "Ankh") && (player.getKnap(1)->getName() == "Golden Scepter") 
				   && (player.getKnap(2)->getName() == "Emerald Scarab")) 
					win = true;
				else if(player.getX() == dungeon.getHeight()-1 && player.getY() == dungeon.getWidth()-1){   
						   
					 cout<<"You do not have right order of items to pass through the Door of Destiny"<<endl;  
					 cout<<"Please try to rearrange items."<<endl;
					 cout<<"To rearrange choose option 5 on the main menu."<<endl<<endl;
					 system("pause");
			   }       
		}
		else if(player.getNumItemsInKnapsack() == 0)
		{
			 cout<<"Your backpack is empty"<<endl;
			 cout<<"You must have all three items to try and complete the right combonation."<<endl;
			 cout<<endl;
			 system("pause");
		}
		else if(player.getNumItemsInKnapsack() == 1)
		{
			 cout<<"You only have one item in your backpack."<<endl;
			 cout<<"You must have all three items to try and complete the right combonation."<<endl;
			 cout<<endl;
			 system("pause");
		}
		else
		{ 
			 cout<<"You only have "<<player.getNumItemsInKnapsack()<<" items."<<endl;
			 cout<<"You must have all three items to try and complete the right combonation."<<endl;
			 cout<<endl;
			 system("pause");
		}

		system("cls");
    	
          
	}
         
	if(win == true)
	{
		   cout<<"As you insert the three items into the Door of Destiny, the entire pyramid begins to shake."<<endl;
		cout <<"The door swings upon and there sits the crown of the Betrayed Pharaoh.  As you place it on your"<<endl;
		cout <<"head, your spirit is uplifted and you feel powerful.  You now have the power of the Egyptian gods."<<endl;
		cout << "Congratulations! You have won the game."<<endl;
		   system("pause");
		   system("cls");
		   cout<<"The End"<<endl;
		return 0;
	}
       
       
	system("cls");
	}

	return 0;

	}
	
	
//IF FILES ARE MISSING, CATCH EXCEPTION!	
	catch (int)
	{
		cout << "Missing file for armor, terminating early" << endl;
		return 1;
	}
	catch (float)
	{
		cout << "Missing file for weapons, terminating early" << endl;
		return 1;
	}

}


void attributes(Character& Build, int& points)
{
	int option;
	
	
	do
	{
		/*********************Builds cells to load attributes into*********************/
		
		int str;
		int dex;
		int con;
		int wis;
		int cha;
		
		int add_or_delete = 0;
		
		/*******************************************************************************/

		/**************Loads cells by calling functions from character class************/
		
		str = Build.getStr();
		dex = Build.getDex();
		con = Build.getCon();
		wis = Build.getWis();
		cha = Build.getCha();


		/***********************************Menu****************************************/
		
		Build.display();
		cout << endl;

		cout<<"You have a total of "<<points<<" points to spend on the attribute that you choose."<<endl<<endl;
		cout<<"1."<<'\t'<<"Add Strength"<<endl;
		cout<<"2."<<'\t'<<"Subract Strength"<<endl;
		cout<<"3."<<'\t'<<"Add Dexterity"<<endl;
		cout<<"4."<<'\t'<<"Subtract Dexterity"<<endl;
		cout<<"5."<<'\t'<<"Add Constitution"<<endl;
		cout<<"6."<<'\t'<<"Subtract Constitution"<<endl;
		cout<<"7."<<'\t'<<"Add Wisdom"<<endl;
		cout<<"8."<<'\t'<<"Subtract Wisdom"<<endl;
		cout<<"9."<<'\t'<<"Add Charisma"<<endl;
		cout<<"10."<<'\t'<<"Subtract Charisma"<<endl;
		cout<<"11."<<'\t'<<"View Character"<<endl;
		cout<<"12."<<'\t'<<"Done modifying attributes"<<endl;
		cout<<"Please choose one of the above options. -> ";
		cin>>option;

		system("cls");

		/*******************************End Menu***************************************/



		if (option > 12)
		{
			cout<<"Invalid reponse. Please re-enter your option.\n";

			cout<<"You have a total of "<<points<<" points to spend on the attribute that you choose."<<endl<<endl;
			cout<<"1."<<'\t'<<"Add Strength"<<endl;
			cout<<"2."<<'\t'<<"Subract Strength"<<endl;
			cout<<"3."<<'\t'<<"Add Dexterity"<<endl;
			cout<<"4."<<'\t'<<"Subtract Dexterity"<<endl;
			cout<<"5."<<'\t'<<"Add Constitution"<<endl;
			cout<<"6."<<'\t'<<"Subtract Constitution"<<endl;
			cout<<"7."<<'\t'<<"Add Wisdom"<<endl;
			cout<<"8."<<'\t'<<"Subtract Wisdom"<<endl;
			cout<<"9."<<'\t'<<"Add Charisma"<<endl;
			cout<<"10."<<'\t'<<"Subtract Charisma"<<endl;
			cout<<"11."<<'\t'<<"View Character"<<endl;
			cout<<"12."<<'\t'<<"Done modifying attributes"<<endl;
			cout<<"Please choose one of the above options. -> ";
			cout << "-> ";
			cin>>option;
		}


		switch (option)
		{
		case 1: 
				cout << "Current points in " << "Strength: " << str << endl; 
				cout<<"Please enter the amount of points that you would like to add"<<endl;
				cout<<"	to strength. -> ";
				cin>>add_or_delete;
				if (add_or_delete > points)
				{
					cout<<"You do not have that many points to spend on this attribute."<<endl;
					cout<<"You only have "<<points<<" points that you can spend."<<endl;
					cout<<"No points were added from this attribute, returning to main menu."<<endl;
					system("PAUSE");
				}
				else
				{
					points = points - add_or_delete;
					str = str + add_or_delete;
					Build.setStr(str);
				}

				break;

		case 2:	
				cout << "Current points in " << "Strength: " << str << endl; 
				cout<<"Please enter the amount of points that you would like to remove"<<endl;
				cout<<"	from strength. -> ";
				cin>>add_or_delete;
				
				if (add_or_delete >= str)
				{
					cout<<"You do not have that many points for this attribute."<<endl;
					cout<<"You only have "<<str<<" points for strength."<<endl;
					cout<<"No points were removed from this attribute, returning to main menu."<<endl;
					system("PAUSE");
					
				}
				else
				{
					points = points + add_or_delete;
					str = str - add_or_delete;
					Build.setStr(str);
				}

				break;

		case 3:	
				cout << "Current points in " << "Dexterity: " << dex << endl; 
				cout<<"Please enter the amount of points that you would like to add"<<endl;
				cout<<"	to Dexterity. -> ";
				cin>>add_or_delete;
				if (add_or_delete > points)
				{
					cout<<"You do not have that many points to spend on this attribute."<<endl;
					cout<<"You only have "<<points<<" points that you can spend."<<endl;
					cout<<"No points were added from this attribute, returning to main menu."<<endl;
					system("PAUSE");
				}
				else
				{
					points = points - add_or_delete;
					dex = dex + add_or_delete;
					Build.setDex(dex);
				}

				break;

		case 4: 
				cout << "Current points in " << "Dexterity: " << dex << endl;
				cout<<"Please enter the amount of points that you would like to remove"<<endl;
				cout<<"	from dexterity. -> ";
				cin>>add_or_delete;
				
				if (add_or_delete >= dex)
				{
					cout<<"You do not have that many points for this attribute."<<endl;
					cout<<"You only have "<<dex<<" points for strength."<<endl;
					cout<<"No points were removed from this attribute, returning to main menu."<<endl;
					system("PAUSE");
				}
				else
				{
					points = points + add_or_delete;
					dex = dex - add_or_delete;
					Build.setDex(dex);
				}

				break;

		case 5:	
				cout << "Current points in " << "Constitution: " << con << endl;
				cout<<"Please enter the amount of points that you would like to add"<<endl;
				cout<<"	to constitution. -> ";
				cin>>add_or_delete;
				if (add_or_delete > points)
				{
					cout<<"You do not have that many points to spend on this attribute."<<endl;
					cout<<"You only have "<<points<<" points that you can spend."<<endl;
					cout<<"No points were added from this attribute, returning to main menu."<<endl;
					system("PAUSE");
				}
				else
				{
					points = points - add_or_delete;
					con = con + add_or_delete;
					Build.setCon(con);
				}

				break;

		case 6:	
				cout << "Current points in " << "Constitution: " << con << endl;
				cout<<"Please enter the amount of points that you would like to remove"<<endl;
				cout<<"	from constitution. -> ";
				cin>>add_or_delete;
				
				if (add_or_delete >= con)
				{
					cout<<"You do not have that many points for this attribute."<<endl;
					cout<<"You only have "<<con<<" points for strength."<<endl;
					cout<<"No points were removed from this attribute, returning to main menu."<<endl;
					system("PAUSE");
					
				}
				else
				{
					points = points + add_or_delete;
					con = con - add_or_delete;
					Build.setCon(con);
				}

				break;

		case 7:	
				cout << "Current points in " << "Wisdom: " << wis << endl;
				cout<<"Please enter the amount of points that you would like to add"<<endl;
				cout<<"	to wisdom. -> ";
				cin>>add_or_delete;
				if (add_or_delete > points)
				{
					cout<<"You do not have that many points to spend on this attribute."<<endl;
					cout<<"You only have "<<points<<" points that you can spend."<<endl;
					cout<<"No points were added from this attribute, returning to main menu."<<endl;
					system("PAUSE");
				}
				else
				{
					points = points - add_or_delete;
					wis = wis + add_or_delete;
					Build.setWis(wis);
				}

				break;

		case 8: 
				cout << "Current points in " << "Wisdom: " << wis << endl;
				cout<<"Please enter the amount of points that you would like to remove"<<endl;
				cout<<"	from wisdom. -> ";
				cin>>add_or_delete;
				
				if (add_or_delete >= wis)
				{
					cout<<"You do not have that many points for this attribute."<<endl;
					cout<<"You only have "<<wis<<" points for strength."<<endl;
					cout<<"No points were removed from this attribute, returning to main menu."<<endl;
					system("PAUSE");
					
				}
				else
				{
					points = points + add_or_delete;
					wis = wis - add_or_delete;
					Build.setWis(wis);
				}

				break;


		case 9: 
				cout << "Current points in " << "Charisma: " << cha << endl;
				cout<<"Please enter the amount of points that you would like to add"<<endl;
				cout<<"	to charisma. -> ";
				cin>>add_or_delete;
				if (add_or_delete > points)
				{
					cout<<"You do not have that many points to spend on this attribute."<<endl;
					cout<<"You only have "<<points<<" points that you can spend."<<endl;
					cout<<"No points were added from this attribute, returning to main menu."<<endl;
					system("PAUSE");
				}
				else
				{
					points = points - add_or_delete;
					cha = cha + add_or_delete;
					Build.setCha(cha);
				}

				break;


		case 10: 
				cout << "Current points in " << "Charisma: " << cha << endl;
				cout<<"Please enter the amount of points that you would like to remove"<<endl;
				cout<<"	from charisma. -> ";
				cin>>add_or_delete;
				
				if (add_or_delete >= cha)
				{
					cout<<"You do not have that many points for this attribute."<<endl;
					cout<<"You only have "<<cha<<" points for strength."<<endl;
					cout<<"No points were removed from this attribute, returning to main menu."<<endl;
					system("PAUSE");
					
				}
				else
				{
					points = points + add_or_delete;
					cha = cha - add_or_delete;
					Build.setCha(cha);
				}

				break;


		case 11: cout<<"Your character currently looks like the following: "<<endl;

				Build.display();

				cout<<endl;
				system("PAUSE");

				break;

		case 12: break;
			

		}




		system ("cls");


	}while (option < 12);
	
}
